package com.aya.simple.pull;

import java.util.Observable;
import java.util.Observer;

public class HumidityObservable implements Observer {

    @Override
    public void update(Observable o, Object arg) {
        if(o instanceof WeatherSubject){
            WeatherSubject subject = (WeatherSubject) o;
            System.out.println("湿度:"+subject.getData().getHumidity());
        }

    }


}
